package com.ccb.sc.common.modules.order.convert;

import com.ccb.sc.common.modules.order.entity.Order;
import com.ccb.sc.common.modules.order.entity.OrderItem;
import com.ccb.sc.common.modules.order.entity.OrderRefund;
import com.ccb.sc.common.modules.order.vo.OrderDetailVo;
import com.ccb.sc.common.modules.order.vo.OrderItemVo;
import com.ccb.sc.common.modules.order.vo.OrderListVo;
import com.ccb.sc.common.modules.order.vo.OrderRefundVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author ken
 * @version 1.0
 * @date 2020-09-27
 */
@Mapper
public interface OrderConvert {

    OrderConvert INSTANCE = Mappers.getMapper(OrderConvert.class);

    OrderItemVo entity2Vo(OrderItem entity);

    List<OrderItemVo> entityVoBatch(List<OrderItem> items);

    OrderListVo entity2Vo(Order order);

    OrderDetailVo entity2DetailVo(Order order);

    OrderRefundVo entity2RefundVo(OrderRefund entity);
}
